<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use app\assets\AdminLoginAsset;
use app\widgets\Alert;
use yii\captcha\Captcha;
use \yii\helpers\Url;
AdminLoginAsset::register($this);
?>
<?php $this->beginPage();?>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>管理员登录平台</title>
    <meta charset="UTF-8">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <?php $this->head();?>
    <!-- 提示升级高级浏览器操作 -->
    <style>
        .ie-content{  position: fixed; left: 0; top: 0; right: 0; bottom:0; background:#fff; z-index: 1000;}
        .ie-content-bj{ width: 1000px; height: 380px; position: fixed; left: 50%; top: 36%; margin:-190px 0 0 -500px; background:url(img/sj.jpg) no-repeat; }
        .ie-list{ padding:168px 0 0 371px; }
        .ie-list a{ margin-right: 80px; }

        #particles-js {
            width: 100%;
            height: 100%;
            /* background: #000; */
            background-size: cover;
            background-position: 50% 50%;
            background-repeat: no-repeat;
        }
    </style>
</head>
<body class="body_bj">
<?php $this->beginBody();?>
<div id="particles-js">
    <div class="login">
        <div class="logo">
            <img src="/admin/login/img/logo.png" alt="">
        </div>
        <li class="login-list">
            <?php $form= ActiveForm::begin(['id'=>'login-form','method'=>'post',
                'fieldConfig' => [
                    'template' => "<div class=\"col-lg-5\">{input}</div>\n<div class=\"col-lg-3 layui-bg-red\">{error}</div>",
                ]
                ]) ?>
            <li><?php echo $form->field($model,'email')->textInput(['placeholder'=>'请输入邮箱'])->label(false) ?></li>
            <li><?php echo $form->field($model,'password')->passwordInput(['placeholder'=>'请输入密码'])->label(false)?></li>
            <li><?php echo $form->field($model,'verifyCode')->widget(Captcha::className(),['captchaAction'=>'/admin/login/captcha','template'=>'{input}<span class="yzm2">{image}</span>','imageOptions'=>['title'=>'点击刷新','alt'=>'点击刷新'],'options' => ['placeholder' => '请输入验证码']])->label(false)?></li>
            <li><?php echo Html::submitButton('登录', ['class'=>'btn btn-primary','name' =>'submit-button']) ?></li>
            <br>
            <li class="tar"><a href='<?php echo Url::toRoute(['login/forget']) ?>'>忘记密码？</a></li>
            <?php ActiveForm::end(); ?>
        </ul>
    </div>
</div>
<!--[if lt IE 8]>
<div class="ie-content">
    <div class="ie-content-bj">
        <div class="ie-list">
            <a href="http://www.google.cn/intl/zh-CN/chrome/browser/"><img src="img/sj1.jpg" alt=""></a>
            <a href="http://www.firefox.com.cn/"><img src="img/sj2.jpg" alt=""></a>
            <a href="http://chrome.360.cn/"><img src="img/sj3.jpg" alt=""></a>
        </div>
    </div>
</div>
<![endif]-->
<?php $this->beginBlock('login');?>
    layui.use(['jquery', 'layer'], function () {
        var $ = layui.jquery,
            layer = layui.layer;
    });
<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['login'], \yii\web\View::POS_END); ?>
<?php $this->beginBlock('login1');?>
    particlesJS('particles-js',
        {
            "particles": {
                "number": {
                    "value": 40,  //数量
                    "density": {
                        "enable": true,
                        "value_area": 800
                    }
                },
                "color": {
                    "value": "#ffffff"
                },
                "shape": {
                    "type": "circle",
                    "stroke": {
                        "width": 0,
                        "color": "#000000"
                    },
                    "polygon": {
                        "nb_sides": 5
                    },
                    "image": {
                        "src": "img/github.svg",
                        "width": 100,
                        "height": 100
                    }
                },
                "opacity": {
                    "value": 0.3,
                    "random": false,
                    "anim": {
                        "enable": false,
                        "speed": 1,
                        "opacity_min": 0.1,
                        "sync": false
                    }
                },
                "size": {
                    "value": 3,
                    "random": true,
                    "anim": {
                        "enable": false,
                        "speed": 40,
                        "size_min": 0.1,
                        "sync": false
                    }
                },
                "line_linked": {
                    "enable": true,
                    "distance": 150,
                    "color": "#ffffff",
                    "opacity": 0.4,
                    "width": 1
                },
                "move": {
                    "enable": true,
                    "speed": 1,
                    "direction": "none",
                    "random": false,
                    "straight": false,
                    "out_mode": "out",
                    "bounce": false,
                    "attract": {
                        "enable": false,
                        "rotateX": 600,
                        "rotateY": 1200
                    }
                }
            },
            "interactivity": {
                "detect_on": "canvas",
                "events": {
                    "onhover": {
                        "enable": true,
                        "mode": "grab"
                    },
                    "onclick": {
                        "enable": false,
                        "mode": "push"
                    },
                    "resize": true
                },
                "modes": {
                    "grab": {
                        "distance": 150,
                        "line_linked": {
                            "opacity": 1
                        }
                    },
                    "bubble": {
                        "distance": 400,
                        "size": 40,
                        "duration": 2,
                        "opacity": 8,
                        "speed": 3
                    },
                    "repulse": {
                        "distance": 200,
                        "duration": 0.4
                    },
                    "push": {
                        "particles_nb": 4
                    },
                    "remove": {
                        "particles_nb": 2
                    }
                }
            },
            "retina_detect": false
        }
    );
<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['login1'], \yii\web\View::POS_END); ?>
<?php $this->endBody();?>
</body>
</html>
<?php $this->endPage();?>